package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"thing/api/internal/config"
	"thing/thingrpc/thingrpcclient"
)

type ServiceContext struct {
	Config   config.Config
	ThingRpc thingrpcclient.Thingrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		ThingRpc: thingrpcclient.NewThingrpc(zrpc.MustNewClient(c.ThingRpc)),
	}
}
